Skip to main content

Get All Posts

The endpoint is used to get all the generated posts.

Request URL

  • GET https://brain.predis.ai/predis_api/v1/get_posts/

Request Payload

NameDescriptionTypeDefault ValuePossible ValuesRequired
brand_idUnique Identifier of your Brand. You can learn more about locating your Brand ID by visiting the link provided here.StringNoneYOUR_BRAND_IDYes
media_typeProvide this information only when you want posts of a specific media_typeStringsingle_imagesingle_image, carousel, videoNo
page_nThe number of page that you want results for.Integer1Any Integer greater than 0No
items_nThe number of items per page that you need.Integer10Any Integer greater than 0. Maximum value is 20. If this value is set to be greater than 20, 20 items will be returned.No

Sample Success Response

{
"posts": [
{
"post_id": "...",
"urls": ["..."],
"caption": "...",
"media_type": "..."
}
],
"total_pages": 5,
"errors": []
}

Sample Error Response

{
"errors": [{
"detail": "...",
"solution": "..."
}]
}

Response Codes

HTTP Status CodeError CodeUser MessageRecommended solution
429001Maximum number of requests reachedMaximum number of hourly requests reached You have been rate-limited. Wait for sometime and try again
400002Invalid brand_id providedYou have provided an invalid brand_id. Please provide a valid brand_id and try again. Read more here

Rate Limiting

Standard API rate limits apply to this endpoint. Read more about the rate limits here